home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
CUGUK
/
PC_LIBS
/
C045.ZIP
/
BTREE.ARC
/
BTREE.DOC
< prev
next >
Wrap
Text File
|
1989-02-08
|
5KB
|
86 lines
This is a shareware implementation of Btree algorithms in Turbo C, ver 2.0.
It is patterned in the fashion of Borland's Pascal 3.0 Btree and Nicklaus
Wirth's fine presentation in his book, Algorithm + Data Structure = Programs.
The author herewith authorizes any noncommercial use of this software for no
fee and disclaims any responsibility for any untoward consequences therefrom.
The routines contained herein have been extensively checked and have met
the performance criteria that they do what they are supposed to do. If
any irregularity is found by any user of this software, the author would
appreciate being informed of same.
Author: Fook H. Eng
428-B South Ramona Ave.
Monterey Park, CA 91754 (818) 572-9220
The file maketree is my MAKE file for the sample program, BTREE.EXE.
I simply compile the program by
make -fmaketree
Of course, you must have the Turbo C executable files, include files,
and TURBOC.CFG in the proper directories on your system.
The syntax for running the program is
btree filename [seed]
where filename is the database file name without the extension .DAT. The
seed is optional, used only for initializing the random number generator.
The database file does not have to exist, but a name must be supplied.
A database file may exist alone without any index files. The BTREE
program will recognize this and provide a choice to reconstruct the index
files.
If a database file does not exist, you will have the option of generating
the database by selecting 'CREATE' to rapidly, imaginatively, and randomly
create the database as you are presented with a view of the pages of the
Btree index structure as each entry is entered. You may also just as rapidly,
though less creatively, delete records from the database from the main menu
by selecting 'DELETE'. Either of these tasks, however, you may perform more
slowly by choosing the 'UPDATE' option and then more specifically create or
delete a record. The educational aspect of each method is different, though.
This archive contains the following files:
PKARC FAST! Archive Create/Update Utility Version 3.5 04-27-87
Copyright (c) 1986,1987 PKWARE Inc. All Rights Reserved. PKARC/h for help
Searching Archive: BTREE.ARC
Filename Length Method Size Ratio Date Time CRC
-------- ------ ------ ------ ----- ---- ---- ---
ACCESS.H 785 Crunched 374 53% 01-17-89 11:17:42 F548
ADDKEY.H 44 Stored 44 0% 01-25-89 12:48:28 A2E9
BTREE.C 2335 Crunched 1162 51% 02-05-89 04:52:24 A444
BTREE.DOC 4357 Crunched 2630 40% 02-05-89 05:32:26 97C5
BTREE.EXE 32056 Crunched 23739 26% 02-05-89 08:38:14 FE34
BTREE.LIB 9728 Crunched 6405 35% 02-05-89 05:07:46 7BF2
BTREEINC.C 19054 Squashed 6759 65% 02-05-89 08:37:56 C385
BTREEINC.H 157 Crunched 98 38% 02-04-89 15:24:42 E8F4
BTUTIL.C 5536 Crunched 2499 55% 02-05-89 08:29:16 168D
BTUTIL.H 279 Crunched 168 40% 02-02-89 21:16:00 D001
CSTRUCT.H 2043 Crunched 926 55% 02-01-89 19:16:06 EB3A
CTRLKEY.H 444 Crunched 203 55% 01-15-89 18:52:48 7643
DATATYPE.H 482 Crunched 212 57% 01-22-89 19:59:06 70FA
DELKEY.H 47 Crunched 45 5% 01-16-88 19:10:58 9359
GETKEY.H 204 Crunched 121 41% 01-16-88 19:19:54 BA8E
GLOBALS.H 498 Crunched 285 43% 02-11-88 12:00:02 9771
MAKETREE 394 Crunched 228 43% 02-03-89 14:33:40 B933
NAMES.H 6048 Crunched 2577 58% 02-03-89 10:12:26 10C2
---- ------ ------ -----
0018 84491 48475 43%
As you can see, there are ten .H header files. The library function of
Btree.lib are all prototyped in the header files access.h, addkey.h,
delkey.h, and getkey.h. These files are commented to, hopefully, shed some
light on its usages. The cstruct.h file divulges the nature of the data
structures used and how they are interlinked. The globals.h header speci-
fies the global variables seen by all those files that #includes it.
Please use these programs freely and pass them on to your friends and BBSs.
If you find them enjoyable, useful, or in any fashion worthwhile, and if
you are so inclined, please send $10.00 to the author in order to become
a registered users for support and future updates. As a registered user,
you may obtain the source codes to BTREE.LIB for a handling charge of an
additional $10.00.
These program files are uploaded to Compuserve Borland's C program forum
in the year of the Snake, February 1989.